package pers.csw.lookBook.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import pers.csw.lookBook.entity.Books;

import java.util.List;

/**
 * @author csw
 */
@Mapper
public interface BooksMapper extends BaseMapper<Books> {
    /**
     * @return 返回男生精选的数据
     */
    @Select("select * from lb_books where category = 6 limit 6")
    List<Books> getMan();

    /**
     * @return 返回女生精选的数据
     */
    @Select("select * from lb_books where category = 9 limit 6")
    List<Books> getWoMan();

    @Select("select * from lb_books where title like'%${title}%' ")
    List<Books> searchBooks(String title);


}
